<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>签到</title>
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css"/>

		<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/miva.utils.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/miva.components.vue.js" type="text/javascript" charset="utf-8"></script>

		<script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>

		<link rel="stylesheet" type="text/less" href="../css/entry.less"/>
    <script src="../js/less.js" type="text/javascript" charset="utf-8"></script>

	</head>
	<body>
    <div id="app">
      <header class="mui-bar mui-bar-nav">
  			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  			<h1 class="mui-title">签到</h1>
  		</header>
  		<div ref="mimiva" class="mui-content">
  			<doubel-module :doubel-data="signinData"></doubel-module>
				<div class="sign-button-box">
					<div class="sign-button sign-active">签到领红包</div>
				</div>
				<sign-in-module v-if="signinData" :signin-data="signinData.sign_list"></sign-in-module>
  		</div>

			<div class="task-list-box">
				<div v-for="temp in 5" class="task-list">
					<span>任务内容 <span class="task-reward">(任务奖励)</span></span>
					<span class="task-button">立即完成</span>
				</div>
			</div>

    </div>

    <script type="text/javascript">

      new Vue({
        el: '#app',
				components: {
					doubelModule: miva.doubelModule,
					signInModule: miva.signInModule,
				},
        data: {
          bookId: mivaUtils.getBookId(window.location.search),
					signinData: '',
        },
				created() {
					const _this = this;
					const params = new URLSearchParams();

					params.append('token', '4f2576980e9f00ac325976742afe54aa');
					axios.post(
						mivaUtils.baseUri + '/Mobile/user/sign',
						params,
						{'Content-type': 'application/x-www-from-urlencode'}
					).then(function(res) {
						// console.log(res.data.result);
						_this.signinData = res.data.result;
					})

				},
        mounted: function() {

        },
        methods: {}
      })
    </script>
	</body>
</html>
